package haoyou.csnf.manager.module.pm.dal.mysql.rulesclasshour;

import java.util.*;

import haoyou.csnf.manager.framework.common.pojo.PageResult;
import haoyou.csnf.manager.framework.mybatis.core.query.LambdaQueryWrapperX;
import haoyou.csnf.manager.framework.mybatis.core.mapper.BaseMapperX;
import haoyou.csnf.manager.module.pm.dal.dataobject.rulesclasshour.RulesClasshourDO;
import org.apache.ibatis.annotations.Mapper;
import haoyou.csnf.manager.module.pm.controller.admin.rulesclasshour.vo.*;

/**
 * 课时费规则 Mapper
 *
 * @author 好有经验源码
 */
@Mapper
public interface RulesClasshourMapper extends BaseMapperX<RulesClasshourDO> {

    default PageResult<RulesClasshourDO> selectPage(RulesClasshourPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RulesClasshourDO>()
                .eqIfPresent(RulesClasshourDO::getTieId, reqVO.getTieId())
                .eqIfPresent(RulesClasshourDO::getEmpType, reqVO.getEmpType())
                .eqIfPresent(RulesClasshourDO::getAmount, reqVO.getAmount())
                .eqIfPresent(RulesClasshourDO::getReserve, reqVO.getReserve())
                .orderByDesc(RulesClasshourDO::getId));
    }

}